package cn.stylefeng.guns.modular.quan.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.quan.entity.CouponReceive;
import cn.stylefeng.guns.modular.quan.model.params.CouponReceiveParam;
import cn.stylefeng.guns.modular.quan.model.result.CouponReceiveResult;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Dong
 * @since 2023-10-31
 */
public interface CouponReceiveService extends IService<CouponReceive> {

    /**
     * 新增
     *
     * @author Dong
     * @Date 2023-10-31
     */
    void add(CouponReceiveParam param);

    /**
     * 删除
     *
     * @author Dong
     * @Date 2023-10-31
     */
    void delete(CouponReceiveParam param);

    /**
     * 更新
     *
     * @author Dong
     * @Date 2023-10-31
     */
    void update(CouponReceiveParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author Dong
     * @Date 2023-10-31
     */
    CouponReceiveResult findBySpec(CouponReceiveParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author Dong
     * @Date 2023-10-31
     */
    List<CouponReceiveResult> findListBySpec(CouponReceiveParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author Dong
     * @Date 2023-10-31
     */
     LayuiPageInfo findPageBySpec(CouponReceiveParam param);

    Object receiveCoupon(String userId, Long couponId);

    Object getCouponById(String userId);

    Object getCouponDetailByUser(String userId, Long couponId);

    Map<String, Object> getFrist(String userId, Long couponId);
}
